﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Brc_DSB.GetWay.Configuration
{
    public class DbConfiguration
    {
        public string DbConnectionStrings { get; set; }

        public List<string> RedisConfig { get; set; }

        /// <summary>
        /// Redis存储的key前缀,默认值brc_gateway,如果分布式缓存多个应用部署，需要修改此值。
        /// </summary>
        public string RedisKeyPrefix { get; set; } = "brc_gateway";

        /// <summary>
        /// 是否启用客户端授权
        /// </summary>
        public bool ClientAuthorization { get; set; } = false;

        /// <summary>
        /// 客户端权限缓存时间
        /// </summary>
        public int ClientAuthorizationCacheTime { get; set; } = 1800;

        /// <summary>
        /// 是否开启重试机制
        /// </summary>
        public bool IsEnableRetry { get; set; } = false;

        /// <summary>
        /// 重试缓存时间
        /// </summary>
        public int RetryCacheTime { get; set; } = 1800;

        /// <summary>
        /// 日志Key
        /// </summary>
        public string ExceptionlessKey { get; set; }
        /// <summary>
        /// 日志地址
        /// </summary>
        public string ExceptionlessAddress { get; set; }

        public int ServiceCacheTime { get; set; } = 1800;
    }
}
